import fetch from '../utils/fetch';

// ! 密码登录
export function loginByPwd(data) {
	return fetch({
		url: '/user/login',
		method: 'post',
		data: data
	});
}

// ! 退出登录
export function logOut(id) {
	return fetch({
		url: `/user/withdraw?id=${id}`,
		method: 'get'
	});
}

// 是否登录
export function getVerifyToken(id) {
	return fetch({
		url: `/user/is_login?id=${id}`,
		method: 'get',
	});
}

//用户信息
export function getRoleInfo(id) {
	return fetch({
		url: `Role/${id}`,
		method: 'get'
	});
}
